<?php
// 设置时区
//date_default_timezone_set('Asia/Shanghai');
//defined('BASEPATH') OR exit('No direct script access allowed');

class Home extends CI_Controller
{

    public function __construct()
    {
        parent::__construct();
		
		$username = $this->session->userdata('username');
		$userid   = $this->session->userdata('userid');
		
		if (!$username || !$userid) {
			redirect('admin/login/index');
		}
    }
	
    // 主页面
    public function index()
    {
    	$this->load->view('admin/index');
    }
    
    public function error()
    {
    	
    }
}
